package com.array_list.student;

import java.util.ArrayList;

public class Test_student {
    public static void main(String[] args) {
        ArrayList<Student> students=new ArrayList<>();
        Student stu1=new Student("zhangsan","male",23);
        Student stu2=new Student("lisi","male",24);
        Student stu3=new Student("xioahua","female",18);
        students.add(stu1);
        students.add(stu2);
        students.add(stu3);
//        System.out.println(students);
        for (int i = 0; i < students.size(); i++) {
            System.out.println("姓名："+students.get(i).getName()+"性别："+students.get(i).getGender()+"年龄："+
                    students.get(i).getAge());
        }
    }
}
